<?php echo $javascript->link('filter_actions');?>
<div class="peloteros index">
    <a href="" class="filtro_a" onclick="show_filter(); return false;"><?php echo __('Filtro', true); ?></a>
    <input type="hidden" id="input_filtro" value="0">
    <div id="filtro_busqueda" class="filtro">
        <fieldset>
            <?php echo $form->create('Pelotero', array('url' => array('controller' => 'peloteros', 'action' => 'index'))); ?>
            <?php
            echo $form->input('name', array('label' => 'Nombre'));
            echo $form->input('address', array('label' => 'Dirección'));
            echo $form->submit(__('Filtrar', true));
            echo $form->end();
            ?>
        </fieldset>
    </div>
    <h2 class="left"><?php __('Peloteros'); ?></h2>
    <div class="actions specific right">
        <ul>
            <li><?php echo $this->Html->link(__('Agregar Nuevo', true), array('action' => 'add')); ?> </li>
        </ul>
    </div>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('Nombre', 'name'); ?></th>
            <th><?php echo $this->Paginator->sort('Teléfono Fijo', 'phone_number'); ?></th>
            <th><?php echo $this->Paginator->sort('Teléfono Celular', 'movil_number'); ?></th>
            <th><?php echo $this->Paginator->sort('Dirección', 'address'); ?></th>
            <th class="actions"><?php __('Acciones'); ?></th>
        </tr>
        <?php
        if (count($peloteros) == 0) {
            ?>
        <tr>
            <td colspan="5">No se encontraron Peloteros</td>
        </tr>
            <?php
        }

        $i = 0;
        foreach ($peloteros as $pelotero):
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
            ?>
        <tr<?php echo $class; ?>>
            <td><?php echo $pelotero['Pelotero']['name']; ?>&nbsp;</td>
            <td><?php echo $pelotero['Pelotero']['phone_number']; ?>&nbsp;</td>
            <td><?php echo $pelotero['Pelotero']['movil_number']; ?>&nbsp;</td>
            <td><?php echo $pelotero['Pelotero']['address']; ?>&nbsp;</td>
            <td class="actions">
                    <?php echo $this->Html->link($this->Html->image('icons/magnifier.png'), array('action' => 'view', $pelotero['Pelotero']['id']), array('title' => __('Ver', true), 'escape' => false)); ?>
                    <?php echo $this->Html->link($this->Html->image('icons/pencil.png'), array('action' => 'edit', $pelotero['Pelotero']['id']), array('title' => __('Editar', true), 'escape' => false)); ?>
                    <?php echo $this->Html->link($this->Html->image('icons/cross.png'), array('action' => 'delete', $pelotero['Pelotero']['id']), array('title' => __('Eliminar', true), 'escape' => false), sprintf(__('Seguro que desea eliminar este Pelotero?', true), $pelotero['Pelotero']['id'])); ?>
            </td>
        </tr>
        <?php endforeach; ?>
    </table>
    <p>
        <?php
        echo $this->Paginator->counter(array(
        'format' => __('Página %page% de %pages%, mostrando %current% registros de %count% en total, a partir del registro %start%, terminando en el %end%', true)
        ));
        ?>	</p>

    <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class' => 'disabled')); ?>
        | 	<?php echo $this->Paginator->numbers(); ?>
        |
        <?php echo $this->Paginator->next(__('Siguiente', true) . ' >>', array(), null, array('class' => 'disabled')); ?>
    </div>
</div>